package com.zh.risk.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.zh.common.entity.BaseEntity;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Date;

import static com.baomidou.mybatisplus.annotation.FieldStrategy.NOT_EMPTY;

@Data
@TableName("elec_iptable")
@ApiModel(value = "黑名单白名单实体信息")
@EqualsAndHashCode(callSuper = true)
@JsonInclude(JsonInclude.Include.NON_NULL)
public class IpTable extends BaseEntity{

  private static final long serialVersionUID = 5639104658306620066L;
  @ApiModelProperty(value = "主键", name = "id")
  @TableId(value = "id", type = IdType.AUTO)
  private Long id;
  @ApiModelProperty(value = "ip地址", name = "ip")
  private String ip;
  @ApiModelProperty(value = "0.封禁，1.正常", name = "status")
  private Integer status;
  @ApiModelProperty(value = "创建日期", name = "createDate")
  private String createDate;
  @ApiModelProperty(value = "操作人", name = "op")
  private String op;
  @ApiModelProperty(value = "1.白名单,2黑名单", name = "type")
  private Integer type;
  @ApiModelProperty(value = "系统类型,本系统代表为2,详情查看数据库描述", name = "sys")
  private Integer sys;

  @ApiModelProperty(value = "逻辑删除字段", name = "deleted")
  @TableLogic
  @TableField(exist = false,select = false,whereStrategy = NOT_EMPTY)
  private Integer deleted;

  public IpTable() { }

  public IpTable(Integer type) {
    this.type = type;
  }
}
